﻿

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace DemoEF.Model
{
    public class Category
    {
        public int CategoryId { get; set; }

        [MinLength(4, ErrorMessage = "Name have minimum 4 character")]
        [MaxLength(36,ErrorMessage="Name have maximum 36 character")]
        public string Name { get; set; }

        public string Description { get; set; }
        public virtual ICollection<Product> Products { get; set; }
    }
}
